package com.warrior.entity;

import javax.persistence.*;
import java.sql.Timestamp;

/**
 * teamEntity
 * Created by Shawn on 2017/3/15.
 */
@Entity
@Table(name = "team", schema = "warrior")
public class TeamEntity {
    private String id;//记录队伍id,用TE-40位uuid表示
    private String name;//记录队伍名称,不可重名
    private String captionId;//记录队伍队长id
    private String logoPath;//记录球队图标缩略图的路径
    private String location;//记录球队所属的位置
    private Integer winNum;//记录该球队的胜场数
    private Integer loseNum;//记录球队负场数
    private Integer drawNum;//记录球队的平场数
    private Integer teamIntegral;//记录队伍赛季积分
    private Integer teamStatus;//记录战队状态,0表示未激活,1表示普通战队,2表示职业战队,3表示待审核
    private Timestamp createdAt;//记录该条记录的创建时间
    private Timestamp updateAt;//记录该条记录的更新时间
    private String createdBy;//记录该条记录的创建者
    private String updateBy;//记录该条记录由何人更新
    private String leaderName;//队长名
    private Integer isLocked;//是否锁定标识,0标识未锁定,1标识锁定
    private String leaderMobile;//队长手机号
    private Integer seriesWins;
    private Integer seriesLose;

    @Id
    @Column(name = "id")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "logo_path")
    public String getLogoPath() {
        return logoPath;
    }

    public void setLogoPath(String logoPath) {
        this.logoPath = logoPath;
    }

    @Basic
    @Column(name = "location")
    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    @Basic
    @Column(name = "win_num")
    public Integer getWinNum() {
        return winNum;
    }

    public void setWinNum(Integer winNum) {
        this.winNum = winNum;
    }

    @Basic
    @Column(name = "lose_num")
    public Integer getLoseNum() {
        return loseNum;
    }

    public void setLoseNum(Integer loseNum) {
        this.loseNum = loseNum;
    }

    @Basic
    @Column(name = "draw_num")
    public Integer getDrawNum() {
        return drawNum;
    }

    public void setDrawNum(Integer drawNum) {
        this.drawNum = drawNum;
    }

    @Basic
    @Column(name = "team_integral")
    public Integer getTeamIntegral() {
        return teamIntegral;
    }

    public void setTeamIntegral(Integer teamIntegral) {
        this.teamIntegral = teamIntegral;
    }

    @Basic
    @Column(name = "team_status")
    public Integer getTeamStatus() {
        return teamStatus;
    }

    public void setTeamStatus(Integer teamStatus) {
        this.teamStatus = teamStatus;
    }

    @Basic
    @Column(name = "created_at")
    public Timestamp getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(Timestamp createdAt) {
        this.createdAt = createdAt;
    }

    @Basic
    @Column(name = "update_at")
    public Timestamp getUpdateAt() {
        return updateAt;
    }

    public void setUpdateAt(Timestamp updateAt) {
        this.updateAt = updateAt;
    }

    @Basic
    @Column(name = "created_by")
    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    @Basic
    @Column(name = "update_by")
    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    @Basic
    @Column(name = "caption_id")
    public String getCaptionId() {
        return captionId;
    }

    public void setCaptionId(String captionId) {
        this.captionId = captionId;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TeamEntity that = (TeamEntity) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (logoPath != null ? !logoPath.equals(that.logoPath) : that.logoPath != null) return false;
        if (location != null ? !location.equals(that.location) : that.location != null) return false;
        if (winNum != null ? !winNum.equals(that.winNum) : that.winNum != null) return false;
        if (loseNum != null ? !loseNum.equals(that.loseNum) : that.loseNum != null) return false;
        if (drawNum != null ? !drawNum.equals(that.drawNum) : that.drawNum != null) return false;
        if (teamIntegral != null ? !teamIntegral.equals(that.teamIntegral) : that.teamIntegral != null) return false;
        if (teamStatus != null ? !teamStatus.equals(that.teamStatus) : that.teamStatus != null) return false;
        if (createdAt != null ? !createdAt.equals(that.createdAt) : that.createdAt != null) return false;
        if (updateAt != null ? !updateAt.equals(that.updateAt) : that.updateAt != null) return false;
        if (createdBy != null ? !createdBy.equals(that.createdBy) : that.createdBy != null) return false;
        if (updateBy != null ? !updateBy.equals(that.updateBy) : that.updateBy != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (logoPath != null ? logoPath.hashCode() : 0);
        result = 31 * result + (location != null ? location.hashCode() : 0);
        result = 31 * result + (winNum != null ? winNum.hashCode() : 0);
        result = 31 * result + (loseNum != null ? loseNum.hashCode() : 0);
        result = 31 * result + (drawNum != null ? drawNum.hashCode() : 0);
        result = 31 * result + (teamIntegral != null ? teamIntegral.hashCode() : 0);
        result = 31 * result + (teamStatus != null ? teamStatus.hashCode() : 0);
        result = 31 * result + (createdAt != null ? createdAt.hashCode() : 0);
        result = 31 * result + (updateAt != null ? updateAt.hashCode() : 0);
        result = 31 * result + (createdBy != null ? createdBy.hashCode() : 0);
        result = 31 * result + (updateBy != null ? updateBy.hashCode() : 0);
        return result;
    }

    @Basic
    @Column(name = "leader_name")
    public String getLeaderName() {
        return leaderName;
    }

    public void setLeaderName(String leaderName) {
        this.leaderName = leaderName;
    }

    @Basic
    @Column(name = "is_locked")
    public Integer getIsLocked() {
        return isLocked;
    }

    public void setIsLocked(Integer isLocked) {
        this.isLocked = isLocked;
    }

    @Basic
    @Column(name = "leader_mobile")
    public String getLeaderMobile() {
        return leaderMobile;
    }

    public void setLeaderMobile(String leaderMobile) {
        this.leaderMobile = leaderMobile;
    }

    @Basic
    @Column(name = "series_wins")
    public Integer getSeriesWins() {
        return seriesWins;
    }

    public void setSeriesWins(Integer seriesWins) {
        this.seriesWins = seriesWins;
    }

    @Basic
    @Column(name = "series_lose")
    public Integer getSeriesLose() {
        return seriesLose;
    }

    public void setSeriesLose(Integer seriesLose) {
        this.seriesLose = seriesLose;
    }
}
